<base-popup
        (closeClick)="closeClick(false)"
        *ngIf="usePopup"
        [height]="height"
        [title]="detailPanelTitle"
        [width]="width">

    <!--自定义内容-->
    <div class="content">
        <sf #sf
            (formChange)="formChange($event)"
            [button]="'none'"
            [formData]="record"
            [mode]="'edit'"
            [schema]="schema"
        >
            <ng-template let-me let-schema="schema" let-ui="ui" sf-template="customBtn">
                <button (click)="ui.customClick.call()" [disabled]="ui.disabled" nz-button nz-popover
                        nzPopoverContent="{{ui.buttonText}}"
                        type="button">
                    <i [nzType]="ui.nzType" nz-icon nzTheme="outline"></i>
                </button>
            </ng-template>
        </sf>
    </div>
    <div *ngIf="showButton" class="rightBtn">
        <button (click)="submit()" [disabled]="! sf.valid" [nzType]="'primary'" nz-button>保存</button>
        <button (click)="sf.reset()" [nzType]="'default'" nz-button>重置</button>
        <ng-container *nzStringTemplateOutlet="customButtons">{{ customButtons }}</ng-container>
    </div>
</base-popup>

<div *ngIf="!usePopup" [style.width]="width" class="sf-content">
    <sf #sfNoPopup
        (formChange)="formChange($event)"
        (formSubmit)="submit()"
        [button]="'none'"
        [formData]="record"
        [mode]="'edit'"
        [schema]="schema"
    ></sf>
    <div *ngIf="showButton" style="text-align: center;">
        <button (click)="submit()" [disabled]="! sfNoPopup.valid" [nzType]="'primary'" nz-button>保存</button>
        <button (click)="sfNoPopup.reset()" [nzType]="'default'" nz-button>重置</button>
        <ng-container *nzStringTemplateOutlet = "customButtons">{{ customButtons }}</ng-container>
    </div>
</div>
